package com.example.administrator.myapplication.login;

import android.app.FragmentTransaction;
import android.os.Bundle;
import android.os.PersistableBundle;
import android.support.annotation.Nullable;
import android.support.v4.app.FragmentActivity;
import android.support.v4.app.FragmentManager;
import android.support.v7.app.AppCompatActivity;
import android.view.Menu;
import android.view.MenuInflater;

import com.example.administrator.myapplication.R;

/**
 * Created by Administrator on 2017/11/6.
 */

public class LoginActivity extends FragmentActivity{
    @Override
    protected void onCreate(@Nullable Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_login);
        getLoginFragment();
    }



    private void getLoginFragment() {
        LoginFragment loginfragment=new LoginFragment();
        android.app.FragmentManager fm=this.getFragmentManager();
        FragmentTransaction ft=fm.beginTransaction();
        ft.replace(R.id.fragment_login,loginfragment);
        ft.commit();


    }


}
